if (document != null && document.hasAspect('caas:locatable')) {
	// apply the templatable aspect
	var template = companyhome.childByNamePath("Data Dictionary/Presentation Templates/locatable-template.ftl");
	if (template != null) {
		document.addAspect('cm:templatable');
		document.properties['cm:template'] = template;
		document.save();
	} else {
		logger.log("Could not find template");
	}
}